package com.kid.keep.dao.child;

import com.kid.keep.po.Child;

import java.util.List;

/**
 * @Description Child dao
 * @Author JOHN
 * @Create 2020-01-02
 * @Since 1.0.0
 */
@SuppressWarnings("all")
public interface IChildRepository {
  Child findByParentIdAndNameAndDataStatus(Long parentId,String name,Integer dataStatus);
  Child findByIdAndParentIdAndDataStatus(Long id,Long userId,Integer dataStatus);
  Child findById(Long id);

  List<Child> findAllChildByParentIdAndDataStatus(Long parentId,Integer dataStatus);

  int updateByIdAndParentId(Child child,Long id,Long parentId);

  int updateByIdAndDataStatus(Child child,Long id,Integer dataStatus);
  Child findNewestChildByParentIdAndDataStatus(Long parentId,Integer dataStatus);
}
